const Objects = (function() {
    function Objects() {}

    Objects.EMPTY_STRING = "";
    Objects.EMTPY_OBJECT = {};
    Objects.EMPTY_ARRAY = [];

    Objects.isUndefined = function(object) {
        return object === undefined;
    };

    Objects.isNull = function(object) {
        return Objects.isUndefined(object) || object === null;
    };

    Objects.isEmpty = function(object) {
        return Objects.isNull(object) || object === Objects.EMPTY_STRING;
    };

    Objects.notUndefined = function(object) {
        return object !== undefined;
    };

    Objects.notNull = function(object) {
        return Objects.notUndefined(object) && object !== null;
    };

    Objects.notEmpty = function(object) {
        return Objects.notNull(object) && object !== Objects.EMPTY_STRING;
    };

    Objects.ensureNotNull = function(object, supply = Objects.EMPTY_STRING) {
        return Objects.notNull(object) ? object : supply;
    };

    return Objects;
})();

export default Objects;
